package cn.yangliu.nacos.gateway.web;

import java.util.HashMap;
import java.util.Map;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 问道于盲
 * @date 2019-08-18
 */
@RestController
@Api("测试控制器")
public class TestController {

    @Value("${sayHi}")
    private String hello;

    @GetMapping("/test")
    @ApiOperation("测试方法")
    public Object test(){
        System.out.println(hello);
        Map<String,Object> data = new HashMap<>(2);
        data.put("name","张飞");
        data.put("age",40);
        return data;
    }
}
